package com.ec.bl.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ec.api.domain.po.BillDetail;
import com.ec.bl.domain.vo.BillDetailVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BillDetailMapper extends BaseMapper<BillDetail> {

    /**
     * 根据账单ID查询账单详情列表
     */
    @Select("SELECT id, item_type, item_description, amount, related_id FROM bill_details WHERE bill_id = #{billId}")
    List<BillDetailVO> selectDetailsByBillId(Long billId);
}
